/**
 * 
 * @author Sunix
 * @date   2013-5-20
 * @Email  SunixSky@gmail.com
 * 
 */	
package manager{
	
	import view.components.DialoguePanel;
	
	public class DialogueManager{
		
		public static function showDialogue(msg:String,
									 title:String = null,
									 sureFun:Function = null,
									 sureParam:Array = null,
									 cancelFun:Function = null,
									 cancelParam:Array = null):void{
			
			var clazz:Class = LoadManager.loader.get("panel").getDefinition("DialoguePanel");
			var dialoguePanel:DialoguePanel = new clazz() as DialoguePanel;	
			StageManger.addWindow(dialoguePanel);
			dialoguePanel.message = msg;
			dialoguePanel.title = title;
			dialoguePanel.sureFun = sureFun;
			dialoguePanel.sureParam = sureParam;
			dialoguePanel.cancelFun = cancelFun;
			dialoguePanel.cancelParam = cancelParam;
		}
	}
}